<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
	<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<link href="/static/css/uploader.css" rel="stylesheet" type="text/css">
</head>
<body style="background-color: white">
<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
					Delete Module
				</h4>
			</div>
			<div class="modal-body">
				Do you really want to delete this account (all data will be cleared) ?
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary" data-dismiss="modal" style="background-color: red;color: white" onclick="del()">Delete
				</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">
					Cancel
				</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>
	<div class="jq22-container">
		<section role="main" class="l-main" style="margin-top:50px;margin-bottom:50px;">
		      <div class="uploader__box js-uploader__box l-center-box">
		          <form action="/uploadFile/" method="POST">
		              <div class="uploader__contents">
		                  <label class="button button--secondary" for="files">Select Files</label>
		                  <input id="files" class="uploader__file-input" type="file" value="Select Files">
		              </div>
		              <input class="button button--big-bottom" type="submit" value="Upload">
		          </form>
		      </div>
		  </section>
                <div style="text-align:center;padding-top: 10px">
    <button id="btn-close" class="btn-close" data-toggle="modal" data-target="#myModal">Delete this module</button>
</div>

	</div>
	
	<script src="/static/js/jquery-1.11.0.min.js"></script>
    <script src="/static/js/uploader.js"></script>
	<script type="text/javascript">
		(function(){
	            var options = {};
	            $('.js-uploader__box').uploader({
	            	'selectButtonCopy':'select files',
	            	'instructionsCopy':'You can select or drag multiple files',
	            	'submitButtonCopy':'Upload',
	            	'furtherInstructionsCopy':'You can select or drag multiple files',
	            	'secondarySelectButtonCopy':'select files'
	            });
	        }());
		function del(){
            $.ajax({
                type:'post',
                url:'/deleteModule/',
                success: function (data) {
                    top.location.href = '/module/'
                }
            })
        }
	</script>
</body>
</html>